CREATE TRIGGER ACTIVITY_REQUESTS_TRG 
BEFORE INSERT ON ACTIVITY_REQUESTS 
FOR EACH ROW 
BEGIN
  <<COLUMN_SEQUENCES>>
  BEGIN
    IF :NEW.ACTIVITY_REQUEST_ID IS NULL THEN
      SELECT ACTIVITY_REQUESTS_SEQ.NEXTVAL INTO :NEW.ACTIVITY_REQUEST_ID FROM DUAL;
    END IF;
  END COLUMN_SEQUENCES;
END;
/
